package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.IMessageActivityModel;
import com.wgts.wgts.mvp.model.imp.MessageActivityModel;
import com.wgts.wgts.mvp.presenter.IMessageActivityPresenter;
import com.wgts.wgts.mvp.presenter.imp.MessageActivityPresenter;
import com.wgts.wgts.mvp.view.IMessageActivityView;
import com.wgts.wgts.netmodle.NetService;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/10/2215:41
 *
 */
@Module
public class MessageActivityModule {
    private IMessageActivityView view;

    public MessageActivityModule(IMessageActivityView view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    public IMessageActivityView provideView(){
        return view;
    }

    @ActivityScope
    @Provides
    public IMessageActivityModel provideModel(NetService netService){
        return new MessageActivityModel(netService);
    }

    @ActivityScope
    @Provides
    public IMessageActivityPresenter providePresenter(IMessageActivityView view, IMessageActivityModel model){
        return new MessageActivityPresenter(view, model);
    }
}
